<h1>Mes photos</h1>

<table>
<% numColonne=0 %>

<tr>

<% for picture in @pictures %>
  <% if numColonne%5==0 %>
    </tr><tr>
  <% end %>  
  <td>
	  <table cellspacing="5">
	  	<tr>
	  	  <td colspan="2"><%= link_to image_tag("./pictures/#{picture.id}-small.#{picture.extension}", :height => "100"), picture %></td>
	  	</tr>
		<tr>
			<% if !@isAdmin %>
				<td align="left"><%= link_to 'Modifier', edit_picture_path(picture) %></td>
			<% end %>
			<td align="right"><%= link_to 'Supprimer', picture, :confirm => 'Etes-vous sur de vouloir supprimer cette photo?', :method => :delete %></td>
		</tr>	
	  </table>  
  </td>	 
  <% numColonne=numColonne+1 %> 
<% end %>

</tr>

</table>

<br />
<% if !@isAdmin %>
	<%= link_to 'Ajouter une photo', new_picture_path %>
<% end %>
